# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=pavucontrol
pkgver=5.0+r61+gee77d86
pkgrel=2
epoch=1
pkgdesc="PulseAudio Volume Control"
url="https://freedesktop.org/software/pulseaudio/pavucontrol/"
arch=(x86_64)
license=(GPL)
depends=(gtkmm3 libsigc++ libcanberra json-glib)
makedepends=(meson lynx git)
checkdepends=(tidy)
optdepends=("pulseaudio: Audio backend")
options=(debug)
_commit=ee77d86eed3c35f9f7a1f2e2da385d4b526d77a1  # master
source=("git+https://gitlab.freedesktop.org/pulseaudio/pavucontrol.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd pavucontrol
  git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd pavucontrol
}

build() {
  arch-meson pavucontrol build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
